<?php
/**
 * Template Name: Cerita Pilihan Editor
 *
 * @GramediaWritingProject
 * @version 1.0
 * @Epifana & Vincentia
 */
 ?>
 <?php

pagination();
get_header(); 

?>
<div class="row clearfix">
    <div class="col-md-12 column content">
	<div class="row clearfix">
		
		<?php  get_template_part( 'kolompertama2' ); ?>
	<?php $paged = get_query_var( 'paged' ) ? get_query_var( 'paged' ) : 1; 
	$args = ( array( 
        'post_type' => 'post',
		'post_status'=>'publish',
		'orderby' => 'post_date',
		'order' => 'DESC',
		'paged' => $paged,
		'cat'=>2,
		'posts_per_page' => 20) 
    ); 
	//$query = new WP_Query( 'cat=13');
	$the_query = new WP_Query($args);?>
        
		<div class="col-md-9 column" > <!-- untuk kolom kedua yang dibagi 2 -->
		<div class="row clearfix">
				<div class="col-md-12 column">
					<div class="judulceritaterbaru2">Cerita Pilihan Editor</div>
                        <!-- start daftar cerita -->
						<?php
				// Start the Loop.
				if ( have_posts() ) : 
				while ( $the_query ->have_posts() ) : $the_query ->the_post();
				 get_template_part( 'content-page' ); 
					endwhile; endif;
				
			?>      
                    <br/>
					<?php wp_pagenavi(array('query'=>$the_query));
				?>
		</div> <!--END class="col-md-12 column"-->
                    </div><!--END class="row clearfix"-->
       </div> <!--END class="col-md-9 column"     --> 
	   </div>   <!--END class="row clearfix"-->	
       </div> <!--END class="col-md-12 column content"-->
	  </div>

	<!-- end untuk content -->
   
    
    <!-- untuk footer -->
	<?php
get_footer();

?>